import java.util.Arrays;

public class shuzu2 {
    public static void main2(String[] args) {
        int[][] array1 = {{1,2,3},{4,5,6}};
        int[][] array2 = new int[][]{{1,2,3},{4,5,6}};
        int[][] array3 = new int[2][3];//0

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < 3; j++) {
                System.out.print(array1[i][j]+" ");
            }
            System.out.println();
        }

        System.out.println("==================");

        for (int i = 0; i < array1.length; i++) {
            for (int j = 0; j < array1[i].length; j++) {
                System.out.print(array1[i][j]+" ");
            }
            System.out.println();
        }

        System.out.println("==================");

        System.out.println(Arrays.toString(array1));
        System.out.println(Arrays.deepToString(array1));//深度打印
        System.out.println(array1[0]);
        System.out.println(array1[1]);
        System.out.println(Arrays.toString(array1[0]));
        System.out.println(Arrays.toString(array1[1]));

        System.out.println("==================");

        System.out.println(array1[0].length);
        System.out.println(array1[1].length);
        System.out.println(array1.length);
    }

    public static void main(String[] args) {
        //不规则的二维数组
        int[][] array4 = new int[2][];//[行][列]
        array4[0] = new int[]{1,2,3};
        array4[1] = new int[]{4,5,6,7,8,9};
        System.out.println(Arrays.deepToString(array4));

        System.out.println("=================");

        int[][] array5 = new int[2][];
        for (int i = 0; i < array5.length; i++) {
            for (int j = 0; j < array5[i].length; j++) {//array5[i]都还是null
                System.out.println(array5[i][j]);
            }
            System.out.println();
        }
    }


}
